编写一个网站的布局、登录、注册
登录:<!DOCTYPE html>
<html>
<head>
<title>登录页面</title>
<link rel="stylesheet" type="text/css" href=".\css\style.css" />
<script type="text/javascript" src=".\js\myscript.js"></script>
</head>
<body>
<div class="login1">
<span class="login1_1">用户登录</span>
</div>
<div class="login2">
<span class="login2_1">用户名:</span>
<input type="text" name="username" id="usr" class="usr_name">
<script type="text/javascript">
document.getElementById("usr").value="";
document.getElementById("usr").focus();
</script>
</div>
<div class="login3">
<span class="login3_1">密 码:</span>
<input type="password" name="password" id="pwd" class="pass_word">
</div>
<div class="login4">
<span class="login4_1">验证码:</span>
<input type="text" id="input1" class="input_code">
<input type="button" id="checkCode" class="codeJS" value="生成验证码" onclick="createCode()"/>
</div>
<div class="login5">
<input type="button" id="sumbitButton" value="登录" onclick="loginValidate()"/>
</div>
</body>
</html>
注册:<!DOCTYPE html>
<html>
<head>
<title>注册页面</title>
<link rel="stylesheet" type="text/css" href=".\css\register.css" />
<script type="text/javascript" src=".\js\register.js"></script>
</head>
<body>
<div class="register1">
<span class="register1_1">用户注册</span>
</div>
<div class="register2">
<div class="ff">
<span class="register2_1">请输入用户名:</span>
</div>
<input type="text" name="username" id="usr" class="usr_name">
<script type="text/javascript">
document.getElementById("usr").value="";
document.getElementById("usr").focus();
</script>
<span>*</span>
</div>
<div class="register3">
<div class="ff">
<span class="register3_1">请输入密码:</span>
</div>
<input type="password" name="password" id="pwd" class="pass_word">
<span>*</span>
</div>
<div class="register3">
<div class="ff">
<span class="register3_1">请再次输入密码:</span>
</div>
<input type="password" name="Rpassword" id="Rpwd" class="pass_word">
<span>*</span>
</div>
<div class="register4">
<div class="ff">
<span class="register4_1">验证码:</span>
</div>
<input type="text" id="input1" class="input_code">
<input type="button" id="checkCode" class="codeJS" value="生成验证码" onclick="createCode()"/>
<span>*</span>
</div>
<div class="register5">
<input type="button" id="sumbitButton" value="注册" onclick="registerValidate()"/>
</div>
</body>
</html>
评论